<?php
class Ecore_Rewrite_Common {
	public function slug($strName) {
		$strName 	= str_replace('/', ' ', Ecore_Function::UTF8Deaccent($strName));
		$strName	= Ecore_Function::convertNoVn($strName);
		$strName	= trim($strName);
		return $strName;
	}
	public function category($intType, $intId, $strName) {
		$strReturn = '';
		if($intType > 0) {
			switch($intType) {
				case EDUCATION_TYPE:
				case EDUCATION_CENTRAL_TYPE:
					$strReturn = HOST_FRONTEND . Ecore_Rewrite_Common::slug($strName) . '-CED' . Ecore_Function::dec2Hex($intId) . '.html';
					break;
			}
		}
		return $strReturn;
	
	}
}
